import { FC } from 'react';
import dayjs from 'dayjs';

interface FormatTimeProps {
  time?: number;
  format?: string;
}

export const FormatTime: FC<FormatTimeProps> = ({ time, format = 'YYYY-MM-DD HH:mm:ss' }) => {
  return <span>{time ? dayjs(time).format(format) : '-'}</span>;
};
